package com.woniu.darryringmall.ucenter.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniu.darryringmall.front.entity.Goods;
import com.woniu.darryringmall.front.entity.User;
import com.woniu.darryringmall.front.service.GoodsService;
import com.woniu.darryringmall.front.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.util.List;

@Controller
@RequestMapping("ucenter/userIndex")
public class UserIndexController {
    @Autowired
    private UserService userService;

    @Autowired
    private GoodsService goodsService;

    /**
     * 进入我的DR的首页
     */
    @GetMapping("list")
    public String list(HttpSession session){
        /*User loginUser=session.getAttribute("user",user);

        //获取热销商品
        QueryWrapper<Goods> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("isHot","y");
        List<Goods> hotGoods=goodsService.list(queryWrapper);
        model.addAttribute("hotGoods",hotGoods);*/

        //获取用户浏览过的商品

        return "member_index";
    }
}
